package com.googlecode.scenemaker3d.view.timeline
{
	import flash.events.Event;
	
	import mx.core.BitmapAsset;
	
	public class Thumb extends SnapDraggableObj
	{
		[Embed(source="com/googlecode/scenemaker3d/view/timeline/assets/thumb.gif")]
		[Bindable]
		private var thumbImg:Class;
		
		public function Thumb(w:uint, h:uint)
		{
			super(w);
			
			//Make thumb
			var icon:BitmapAsset = new thumbImg();
			icon.alpha = 1;
			icon.width = w;
			icon.height = h;
			
			this.addChild(icon);
			this.addEventListener("objectUp", onThumbUp);
			this.addEventListener("objectMove", onThumbMove);
		}
		private function onThumbUp(e:Event):void
		{
			this.dispatchEvent(new Event("thumbUp"));
		}
		private function onThumbMove(e:Event):void
		{
			this.dispatchEvent(new Event("thumbMove"));
		}
		/* override protected function update():void
		{
			this.dispatchEvent(new Event("thumbMove"));
		} */ 
		
	}
}